import pandas as pd
import matplotlib.pyplot as plt

class ResultPresenter:
    def __init__(self, result):
        self.result = result
    
    def display(self):
        if isinstance(self.result, pd.DataFrame) or isinstance(self.result, pd.Series):
            print(self.result)
            self.result.plot(kind='bar')
            plt.show()
        else:
            print(f"Query result: {self.result}")

